package spec.zhangyuehua.$04.animal;

import java.util.Date;

/**
 * Created by yue on 2017/11/2.
 */
public class Frog extends Animal implements IAnimal {
    public String lx;

    public Frog(String name, String food, String area, String lx) {
        super(name, food, area);
        this.lx = lx;
    }

    public Frog(String lx) {
        this.lx = lx;
    }
    @Override
    public String findFood() {
        String n=super.getName();
        String x=super.getFood();
        return n+"觅食"+x;
    }
    @Override
    public String wholeLife() {
        String b=this.born();
        String o=this.old();
        String s=this.sick();
        String d=this.die();
        return b+"\n"+o+"\\n"+s+"\n"+d+"\\n";
    }

    @Override
    public String born() {
        String n=super.getName();
        Date d=new Date();
        return "出生日期"+d.toString();
    }

    @Override
    public String old() {
        String n=super.getName();
        return n+"变老";
    }

    @Override
    public String sick() {
        String n=super.getName();
        return n+"生病";
    }

    @Override
    public String die() {
        String n=super.getName();
        return n+"死亡";
    }
}
